Main ----- Copyright Up -------- ----

But I gotta have it
Watch out for the damage

(Vanessa Paradis, "Gotta Have It")

Undocumented features

This chapter covers some undocumented features of hsc. Most of them are hardly tested, some of them are rather inconsistent. Also, I did not make much afford to explain them very well. Try to use them only inside macros, so you do not have to perform loads of modifications if some of these are renamed/changed for future versions.

Additional operators

There are several boolean operators you can use within expressions:

Additional tags

<$export>

This one can be used to export data to a file. Possile attributes:
FILE:string/required
Name of file where to write output. If the file already exists, it will be overwritten without any warning.
DATA:string/required
Data to store in the file
APPEND:bool
If the output file already exists, the new data will be appended with leaving the old contents intact.

Options file

On startup, hsc will look for an options file, which will be parsed for command line options before the actual command line options passed from CLI. Values set in the options file can be overwritten by command line options later.

The format of the options file is easy as can be: it consists of several lines, with every line containing one single options, and, if necessary, also a ``=´´ and a value. An example options file could look like this:
    FROM=include/stdmacros.hsc
    TO=www:sepp/
    COMPACT
    IGNORE=notes|style
The options file always has to be names hsc.options.

Conditional assignments

When assigning new values to attributes, you can also make them inherit values of other attributes by using
    SEPP=(HUGO)
However, if HUGO has not been defined and assigned a value before, this will result in an error message. Conditional assignments now only assign a value to the target attribute, if the source attribute has been defined. Simply use a ``?=´´ instead of the ``=´´ assignment operator:
    SEPP?=HUGO
This becomes handy for macros which are more or less only extensions to real html-tags:
    <$macro xBODY TEXT:color LINK:color>
        <BODY TEXT?=TEXT LINK?=LINK BACKGROUND="image/back.png">
    </$macro>
Now you can use the macro <xBODY> as an replacement for the tag <BODY>: using a simple
    <xBODY>
will result in
    <BODY BACKGROUND="image/back.png">
but a
    <xBODY TEXT='#123456' LINK='#654321'>
will lead to
    <BODY TEXT='#123456' LINK='#654321' BACKGROUND="image/back.png">
thus also adding the attributes TEXT and LINK to the tag call.

On the first sight, it might seem that there is only the simple condition ``if attribute is set..´´ is possible. But no one prevents you from using code like this:

    <$if COND=(awfully complex condition))>
        <$define TEXT:color='#123456'>
    <$else>
        <$define TEXT:color='#001234'>
    </$if>

    <xBODY TEXT?=TEXT>
Conditional assignments still seem to have a problem when being used within <$let>, therefor use them only for assignments within tags and macros.